home *** CD-ROM | disk | FTP | other *** search
- /* DisplayLog.h */
- /*
- * DumpLog.h
- * Copyright © 1992-95, Apple Computer Inc. All Rights Reserved.
- * Programmed by Martin Minow,
- * Internet: minow@apple.com
- * AppleLink: MINOW
- *
- * Edit History
- */
- #define TESTING 1
-
- #ifndef TESTING
- #define TESTING 0
- #endif
- #ifndef SystemSevenOrLater
- #define SystemSevenOrLater 1
- #endif
-
- #define kVersionMajor 1
- #define kVersionMinor 0
- #define kVersionStage beta /* Res only */
- #define kVersionStageLetter 'b'
- #define kVersionRelease 1
- //** #define kApplicationCreator 'MAM1' /* Registered application creator */
-
- /*
- * Resource definitions
- */
- #define MBAR_MenuBar 1
- #define MENU_Apple 1
- #define MENU_File 256
- #define MENU_Edit 257
- #define DLOG_About 128
- #define ALRT_NonFatalError 129
- #define ALRT_FatalError 130
- /*
- * This is the output file creator type - it should be in a preference file
- * 'MPS ' MPW
- * 'KAHL' Think C
- * 'MPCC' MetroWerks
- * 'R*ch' BBEdit
- * 'ttxt' Teach Text
- * 'EDIT' Generic (no owner)
- */
- #define kOutputCreatorID 'MPCC'
-
- #ifndef REZ
- #include <Errors.h>
- #include <Finder.h>
- #include <Folders.h>
- #include <Script.h>
- #include <Types.h>
- #include <Resources.h>
- #include <QuickDraw.h>
- #include <Fonts.h>
- #include <Events.h>
- #include <Windows.h>
- #include <Menus.h>
- #include <TextEdit.h>
- #include <Dialogs.h>
- #include <ToolUtils.h>
- #include <Memory.h>
- #include <Files.h>
- #include <OSUtils.h>
- #include <OSEvents.h>
- #include <Printing.h>
- #include <Traps.h>
- #include <Gestalt.h>
- #include <Processes.h>
- #include <StandardFile.h>
- #include <ToolUtils.h>
-
- #include "LogLibrary.h"
-
- #ifndef TRUE
- #define TRUE 1
- #define FALSE 0
- #endif
- #ifndef EXTERN
- #define EXTERN extern /* Not in main program */
- #endif
- #define UNUSED(what) do { \
- what; \
- } while (0)
- /*
- * Cheap 'n dirty pascal string copy routine.
- */
- #ifndef pstrcpy
- #define pstrcpy(dst, src) do { \
- const StringPtr _src = (src); \
- BlockMove(_src, dst, _src[0] + 1); \
- } while (0)
- #endif
- /*
- * Cheap 'n dirty pascal string concat.
- */
- #ifndef pstrcat
- #define pstrcat(dst, src) do { \
- StringPtr _dst = (dst); \
- const StringPtr _src = (StringPtr) (src); \
- short _len; \
- _len = 255 - _dst[0]; \
- if (_len > _src[0]) _len = _src[0]; \
- BlockMove(&_src[1], &_dst[1] + _dst[0], _len); \
- _dst[0] += _len; \
- } while (0)
- #endif
-
-
- /*
- * These are the "SleepTime" parameters for WaitNextEvent. The idea is that we
- * sleep for a long time if we're in the background; for a short time if active.
- */
- #define kForegroundTicks 6
- #define kBackgroundTicks 15
-
- void WriteAllLogRecords(void);
- void WriteThisLogRecord(
- LogRecordPtr logRecordPtr
- );
-
- void DoAllLogRecords(void);
- void DoThisLogEntry(
- LogEntryPtr logEntryPtr
- );
- /* */
- void DumpDrawLine(
- ConstStr255Param datum
- );
- void DumpDrawString(
- ConstStr255Param datum
- );
- void DumpDrawText(
- const char *datum,
- unsigned short length
- );
- extern void Multiply64(
- const UnsignedWide *multiplicand, /* Multiplier * multiplicand */
- UInt32 multiplier, /* yields result */
- UnsignedWide *resultPtr
- );
- extern void Divide64(
- UnsignedWide *dividendPtr, /* Dividend, becomes remainder */
- const UnsignedWide *divisorPtr, /* Divisor, unchanged */
- UnsignedWide *quotientPtr /* Quotient, result */
- );
- extern void Add64(
- register const UnsignedWide *aPtr,
- register const UnsignedWide *bPtr,
- register UnsignedWide *result
- );
- extern void Subtract64(
- register const UnsignedWide *bigPtr,
- register const UnsignedWide *littlePtr,
- register UnsignedWide *result
- );
-
- EXTERN MenuHandle gAppleMenu;
- EXTERN MenuHandle gFileMenu;
- EXTERN MenuHandle gEditMenu;
- EXTERN WindowPtr gDisplayWindow;
- EXTERN Rect gBoundsRect;
- EXTERN Boolean gQuitNow;
- EXTERN Boolean gUpdateMenusNeeded;
- EXTERN Boolean gInForeground;
- EXTERN EventRecord gEventRecord;
- #define EVENT (gEventRecord)
- EXTERN short gVolRefNum;
- EXTERN short gFileRefNum;
- EXTERN Str63 gFileName;
- EXTERN Nanoseconds gNanosecondsAtStart; /* Relate UpTime to civil time */
- EXTERN WindowPtr gStatusWindow;
- EXTERN Str255 gMessageString;
- EXTERN Str255 gCurrentLine;
-
- #endif /* REZ */
-